mtxyrs = {}
QMPlugin = mtxyrs

mtxyrs.intX = -1
mtxyrs.intY = -1

function mtxyrs.init()
    mtxyrs.flagArr = {
        {
            invoke = mtxyrs.stage1,
            fmcFlag = {
                "【西游入世】stage1 从震惊中回过神来",
                1027,
                167,
                1266,
                486,
                "CAE4EE",
                "22|2|C6DFE9,40|3|CBE4EF,64|-2|C3DCE6,86|-5|C6DFE9,104|0|C7E1EB,121|2|D0EBF6,17|14|CAE2EC,41|16|C4D6DF,64|25|C4DDE7",4,0.9
            }
        }
    }

    mlog.info("mtxyrs init >>>>>>>>>>>")
end

function mtxyrs.stage1()
    game.tap(mtxyrs.intX, mtxyrs.intY, 20, 20)
end

function mtxyrs.exec()
    for k,v in pairs(mtxyrs.flagArr) do
        local exsits = utils.retry(function()
                local fx,fy = game.findMultiColor(utils.unpack(v.fmcFlag))
                mtxyrs.intX = fx
                mtxyrs.intY = fy
                return fx and fx > -1
        end)

        if exsits then
            v.invoke()
            break
        end
    end
end


